package com.synnex.mobile.servier.core.notification.bo;

import com.synnex.mobile.generic.core.util.ObjectUtil;
import com.synnex.mobile.servier.core.notification.dto.DeviceToken;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: kerryf
 * To change this template use File | Settings | File Templates.
 */
public class DeviceTokenBo extends DeviceToken implements Serializable {


    public static DeviceTokenBo createInstance(DeviceToken deviceToken) {
        DeviceTokenBo deviceTokenBo = ObjectUtil.copyProperties(deviceToken, DeviceTokenBo.class);
        return deviceTokenBo;
    }

    public static List<DeviceTokenBo> createListInstances(List<DeviceToken> deviceTokens) {
        List<DeviceTokenBo> deviceTokenBos = new ArrayList<DeviceTokenBo>();
        if (deviceTokens != null) {
            for (DeviceToken deviceToken : deviceTokens) {
                deviceTokenBos.add(createInstance(deviceToken));
            }
        }
        return deviceTokenBos;
    }
}
